import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import './index.css';
  const token = localStorage.getItem("token")
  
  if(!token){
   if(window.location.pathname !== '/login'){
    window.location.href ='/login'
   }
    
  }

const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);
root.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);

